package com.yzk.train.${module}.request;

<#list typeSet as type>
<#if type=='Date'>
import java.util.Date;
import com.alibaba.fastjson2.annotation.JSONField;
</#if>
<#if type=='BigDecimal'>
import java.math.BigDecimal;
</#if>
</#list>

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.ToString;

@Data
@ToString
public class ${Domain}SaveReq {

    <#list fieldList as field>
    // ${field.comment}
    <#if field.javaType=='Date'>
        <#if field.type=='time'>
            @JSONField(format = "HH:mm")
        <#elseif field.type=='date'>
    @JSONField(format = "yyyy-MM-dd")
        <#else>
            @JSONField(format = "yyyy-MM-dd HH:mm")
        </#if>
    </#if>
    <#if field.name!="id" && field.nameHump!="createdAt" && field.nameHump!="updatedAt">
        <#if !field.nullAble>
            <#if field.javaType=='String'>
    @NotBlank(message = "【${field.nameCn}】不能为空")
            <#else>
    @NotNull(message = "【${field.nameCn}】不能为空")
            </#if>
        </#if>
    </#if>
    private ${field.javaType} ${field.nameHump};

    </#list>
}
